<template>
  <div class="footstyle">
    <p class="name">{{ name }}</p>
    <p class="like-collect">已有{{ likeCount }}人点赞&nbsp;&nbsp;&nbsp;&nbsp;{{ viewCount }}人收藏</p>
    <p class="user-name">{{ authorName }}</p>
    <p class="source">来自网上厨房</p>
    <div class="foot-desc">
      <p>{{ description }}</p>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      require: true
    },
    likeCount: {
      type: [String, Number],
      default: 0
    },
    viewCount: {
      type: [Number, String],
      default: 0
    },
    authorName: {
      type: String,
      default: ''
    },
    description: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="less" scoped>
p {
  text-align: center;
  font-size: 12px;
}

.name {
  font-size: 16px;
  font-weight: 600;
  padding: 20px 0 5px;
}

.like-collect {
  padding: 5px 0 15px;
  color: #a5a5a5;
}
.user-name,
.source {
  padding-bottom: 3px;
  color: #777;
}

.foot-desc {
  position: relative;

  p {
    text-align: center;
    padding: 20px 30px 30px;
    font-size: 12px;
    line-height: 24px;
  }

  &::before,
  &::after {
    content: '';
    display: block;
    width: 24px;
    height: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
  }

  &::before {
    top: 0;
    left: 10px;
    background-image: url('@/assets/home/recipe_comment_up.png');
  }

  &::after {
    bottom: 0;
    right: 10px;
    background-image: url('@/assets/home/recipe_comment_down.png');
  }
}
</style>
